<?php 
if (isset($_GET['a'], $_GET['b'])) {
	$a = (int) $_GET['a'];
	$b = (int) $_GET['b'];
	$result = array();
	if ($a > $b) {
		$result['errorr'] = "Error: $a > $b!";
		echo json_encode($result);
		return;
	}
	$arr = array();
	$i = 0;
	while ($a <= $b) {
		$arr[$i++] = $a * $a;
		$a++;
	}
	$result['arr'] = $arr;
	echo json_encode($result);
}
?>